home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Fade Demo
- ** ---------
- ** Fades into a 32 colour picture. Then fades up to a specified colour
- ** (lime green), and then out to black.
- **
- ** SAS/C: 1> sc GreenFade.c link startup=LIB:gms.o data=far nostackcheck
- ** Dice: 1> dcc -l0 -mD gms.o GreenFade.c -o GreenFade
- */
-
- #include <proto/games.h>
-
- extern struct GMSBase *GMSBase;
- ULONG PREFSNAME = DEFAULT;
-
- void main(void)
- {
- int FState=0;
- struct GameScreen *screen;
- struct Picture *pic;
-
- if (pic = LoadPicFile("GMS:demos/data/PIC.Loading",VIDEOMEM|GETPALETTE)) {
-
- screen = GetScreen();
- CopyStructure(pic,screen);
- screen->MemPtr1 = pic->Data;
-
- if (screen = AddScreen(screen)) {
-
- ShowScreen(screen);
-
- do {
- WaitVBL();
- FState = ColourToPalette(screen,FState,2,0,32,pic->Palette,0x000000);
- } while (FState != NULL);
-
- do {
- WaitVBL();
- FState = PaletteToColour(screen,FState,2,0,32,pic->Palette,0xa5f343);
- } while (FState != NULL);
-
- do {
- WaitVBL();
- FState = ColourMorph(screen,FState,2,0,32,0xa5f343,0x000000);
- } while (FState != NULL);
-
- DeleteScreen(screen);
- }
- FreePic(pic);
- }
- }
-
-